package ai.leinao.alarm.service;

import ai.leinao.alarm.domain.AlarmGroupConverge;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * 告警组聚合服务
 *
 * @author zhong.wang
 * @date 2025/9/8
 **/
@Service
public class AlarmCroupConvergeService {

    /**
     * 获取告警组聚合规则
     * @return
     */
    public List<AlarmGroupConverge> getAlarmGroupConverge() {
        List<AlarmGroupConverge> alarmGroupConverges = new ArrayList<>();
        AlarmGroupConverge defaultRule = new AlarmGroupConverge();
        defaultRule.setName("alarmTypeGroupConverge");
        defaultRule.setGroupWait(10L);
        defaultRule.setGroupInterval(10L);
        defaultRule.setId(1L);
        defaultRule.setGroupLabels(Arrays.asList("mainType","subType","deviceId"));
        alarmGroupConverges.add(defaultRule);
        return alarmGroupConverges;
    }
}
